home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / SPREOTUS / 123TECH.LZH / LOT102.TXT < prev    next >
Text File  |  1984-11-04  |  11KB  |  249 lines

  1.     1-2-3 Notes 
  2.     All Versions 
  3.     September 6, 1984 
  4.     Lotus Development Corporation 
  5.  
  6.     NOTE 102 
  7.     Memory Use 
  8.  
  9.  
  10.     Introduction 
  11.  
  12.     A 1-2-3 worksheet has 256 columns and 2,048 rows (or 523,288
  13.     cells), but the actual amount of information you can enter on one
  14.     worksheet depends on the amount of available memory.  Available
  15.     memory depends on four factors: 
  16.  
  17.     *  the amount of Random Access Memory (RAM) in the computer 
  18.     *  the organization of the worksheet 
  19.     *  the type of data you are entering 
  20.     *  the amount of information you enter in each cell 
  21.  
  22.     This note examines some basic aspects of 1-2-3 and memory use. 
  23.  
  24.  
  25.  
  26.     Random Access Memory 
  27.  
  28.     Random Access Memory, or RAM, is the amount of temporary memory
  29.     available in the computer.  The memory is temporary because
  30.     information is stored in RAM only when the computer is turned on.
  31.     If you turn the computer off, all the information in RAM is lost.
  32.     (To permanently store information, you save it on a floppy disk or
  33.     hard disk.) 
  34.  
  35.     RAM is measured in bytes.  One kilobyte, or 1K, is equal to 1,024
  36.     bytes.  If a computer has 256K, it has 256 kilobytes (or 262,144
  37.     bytes) of RAM. 
  38.  
  39.     Think of RAM as spaces in the computer for storing information
  40.     while you are working.  The larger the RAM, the more bytes, or
  41.     spaces, are available for use with a worksheet. 
  42.  
  43.  
  44.  
  45.     The /Worksheet Status Command 
  46.  
  47.     The /Worksheet Status command displays information about the
  48.     worksheet settings and the amount of available memory on a
  49.     worksheet.  Begin with a new 1-2-3 worksheet on the screen and
  50.     select the /Worksheet Status command. 
  51.  
  52.     The headings for the worksheet settings and available memory
  53.     appear at the top of the screen.  The third line displays the
  54.     status of the settings and memory.  The number under Avail Memory
  55.     is the amount of RAM (in bytes) available for use with the
  56.     worksheet.  (This is not the available space on the disk.) 
  57.  
  58.     On a new worksheet, the Avail Memory status reflects the amount of
  59.     RAM in the computer minus the memory used by 1-2-3 and the
  60.     operating system.  The available memory will vary depending on
  61.     which version of 1-2-3 you are using, the size of the operating
  62.     system, and the particular drivers you have installed.  1-2-3
  63.     requires approximately 100K, and the operating system may need
  64.     from 12K to 30K depending on the system.  The remaining memory is
  65.     available for a worksheet, and the amount of available memory will
  66.     decrease as you enter information on the worksheet. 
  67.  
  68.     Note:  1-2-3 does not support the use of the Assign command in
  69.            DOS.  If you have used DOS's Assign command, the available
  70.            memory status may be over several megabytes. 
  71.  
  72.     If you add memory to the computer, the increase will automatically
  73.     be reflected by an increased amount of memory available for the
  74.     worksheet.  The amount of memory you can add varies from computer
  75.     to computer. 
  76.  
  77.  
  78.  
  79.     Worksheet Organization and Memory Use 
  80.  
  81.     The way information is organized on a worksheet helps determine
  82.     how much memory is needed.  1-2-3 defines the "active worksheet
  83.     area" as a rectangle extending from cell A1 to the last column and
  84.     row where information was entered or a cell was formatted.  You
  85.     can identify this active area by pressing the End key followed by
  86.     the Home key.  This moves the pointer to the cell in the
  87.     lower-right corner of the active area. 
  88.  
  89.     It is important to know the size of the active area because 1-2-3
  90.     allocates 4 bytes of memory for every blank cell that falls within
  91.     the active area of the worksheet.  For example, if you entered
  92.     information in cell T20, 1-2-3 would define the active area as the
  93.     range from A1 to T20.  Memory would be allocated for that range
  94.     even though you entered information in only one cell.  If you
  95.     pressed the End key followed by the Home key, the pointer would go
  96.     to cell T20. 
  97.  
  98.     Since blank cells in the active area take up memory, you should
  99.     make the active area of the worksheet as compact and close to A1
  100.     as possible. 
  101.  
  102.     Note:  If you are creating a worksheet containing a macro, keep in
  103.            mind that blank rows and columns between the macro and the
  104.            worksheet use up memory.  Although you should enter a macro
  105.            in a blank area of the worksheet, choose a spot that will
  106.            keep the active area of the worksheet as small as possible. 
  107.  
  108.  
  109.     Using End-Home to Evaluate the Active Area 
  110.  
  111.     The following exercise uses the End and Home keys to examine the
  112.     relationship between worksheet size, organization, and memory use. 
  113.  
  114.     1.  Start with an empty worksheet.  Move the pointer to any cell
  115.         but do not enter any information.  To check the End-Home
  116.         position, press the End key and then the Home key.  The
  117.         pointer should move to cell A1 because you have not entered
  118.         any information on the worksheet. 
  119.  
  120.     2.  Select /Worksheet Status.  Look under Avail Memory and write
  121.         down the number of bytes available on the empty worksheet.
  122.         Press the Return key to return to Ready Mode. 
  123.  
  124.     3.  Go to cell E1 and enter a single letter.  Move the pointer
  125.         back to cell A1.  Now press the End and Home keys.  The
  126.         pointer should move to cell E1 because 1-2-3 has defined the
  127.         active area of the worksheet as the range from A1 to E1. 
  128.  
  129.     4.  Select /Worksheet Status again and look at the available
  130.         memory.  1-2-3 has used 4 bytes for every empty cell in the
  131.         active area between cells A1 and E1.  Write down how much
  132.         memory is now available.  Press Return. 
  133.  
  134.     5.  Go to cell A10 and enter a single letter.  Press the End and
  135.         Home keys, and the pointer should move to cell E10.  Remember,
  136.         1-2-3 defines the active area as a rectangle extending from
  137.         cell A1 to the last column and row where information was
  138.         entered.  1-2-3 now defines the active area as the range from
  139.         A1 to E10. 
  140.  
  141.     6.  Select /Worksheet Status again and look at the available
  142.         memory.  Compare the number under Avail Memory to the other
  143.         two numbers you wrote down.  1-2-3 has used 4 bytes for every
  144.         blank cell in the active area between cells A1 and E10.  Press
  145.         the Return key to return to Ready Mode. 
  146.  
  147.  
  148.     Using /File Xtract to Adjust the Active Area 
  149.  
  150.     Sometimes the End-Home position is not where you expect it to be.
  151.     If you have placed and then erased information or accidently typed
  152.     a character in a remote cell, the End-Home position may be far
  153.     from the worksheet data and you may get a Memory Full error
  154.     message.  Memory Full means there is no more memory (RAM)
  155.     available for use with the worksheet.  Erasing the contents of a
  156.     cell does not change the active area of the worksheet, so erasing
  157.     a cell or even deleting several rows will not increase the
  158.     available memory. 
  159.  
  160.     To decrease the active area of a worksheet and regain memory, use
  161.     the /File Xtract command.  /File Xtract copies all of the
  162.     information in a specified range of the worksheet to a separate,
  163.     new worksheet file.  The active area of this new worksheet file
  164.     includes only the range of information you copied. 
  165.  
  166.     Note:  If you are doing a /File Xtract on a worksheet, be sure to
  167.            include all the information you want copied into the new
  168.            file.  Also, choose a new file name.  If you choose an
  169.            existing file name, the worksheet you are extracting will
  170.            replace the existing file.  See the 1-2-3 User's Manual for
  171.            more information on /File Xtract. 
  172.  
  173.     1.  Start with a new worksheet and enter the following
  174.         information, beginning in cell A1: 
  175.  
  176.                   A        B        C 
  177.            1  1984     Jan.     Feb. 
  178.            2  Rent         550     550 
  179.            3  Food         400     350 
  180.            4  Car          180      40 
  181.            5  Medical       65       0 
  182.  
  183.     2.  Press the End and Home keys.  The pointer should move to cell
  184.         C5.  Select /Worksheet Status and write down the amount of
  185.         available memory. 
  186.  
  187.     3.  Go to cell E10 and enter a number or letter.  Go back to cell
  188.         A1 and press the End and Home keys to identify the active area
  189.         of the worksheet.  Select /Worksheet Status and write down the
  190.         amount of available memory. 
  191.  
  192.     4.  Go to cell E10 and use the /Range Erase command to erase the
  193.         information there.  Move back to cell A1 and press End and
  194.         Home again.  Even though you erased the information in cell
  195.         E10, 1-2-3 remembers that information was placed there and
  196.         does not change the active area of the worksheet.  Select
  197.         /Worksheet Status.  You will see you have not regained any
  198.         memory by erasing cell E10. 
  199.  
  200.     5.  Move the pointer to cell A1 and select /File Xtract.  Select
  201.         Formulas. 
  202.  
  203.     6.  Type in a new file name.  Name the new file Memory for this
  204.         example.  Press Return. 
  205.  
  206.     7.  Now specify the worksheet range that you want to extract into
  207.         the new file, Memory.  The range should include only cells
  208.         with relevant information (A1 to C5 in this example).  Do not
  209.         include the blank cells below or to the right of the worksheet
  210.         data. 
  211.  
  212.     8.  Press Return, and 1-2-3 will extract the range you specified
  213.         and make a new worksheet file. 
  214.  
  215.     9.  To see the new file, select /File Retrieve and choose the file
  216.         named Memory.  Check the size of the active area of the new
  217.         file by pressing End and Home.  The End-Home position should
  218.         be cell C5.  Select /Worksheet Status and check the available
  219.         memory.  It should be greater than the amount of memory you
  220.         recorded before extracting the file. 
  221.  
  222.  
  223.     Worksheet Content and Memory Use 
  224.  
  225.     The amount of information you can enter on a worksheet depends on
  226.     the content of the cells as well as the organization of the data.
  227.     The following information should help you evaluate memory use in a
  228.     worksheet: 
  229.  
  230.     *  Blank cells use 4 bytes. 
  231.  
  232.     *  Integers (numbers between -32768 and 32768) use 4 bytes. 
  233.  
  234.     *  Real numbers use 12 bytes. 
  235.  
  236.     *  Labels up to 4 characters long use 6 bytes.  Longer labels use
  237.        an additional byte for each additional character.  For example,
  238.        a 3-character label would use 6 bytes, and a 10-character label
  239.        would use 12 bytes. 
  240.  
  241.     *  Formulas use a minimum of 30 bytes.  The more complex a
  242.        formula, the more memory it uses. 
  243.  
  244.     *  Range names use 32 bytes each, regardless of the length of the
  245.        name. 
  246.  
  247.     *  Graph names use 461 bytes each, regardless of which options are
  248.        used. 
  249.